Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: migration for unique connections #9076

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

kwasniew
Copy link
Contributor

@kwasniew kwasniew commented Jan 10, 2025

About the changes

We need to store unique connections from SDKs.

Screenshot 2025-01-10 at 11 32 07

The id will be current or previous string for current or previous hour. We only need to have 2 buckets for metrics reporting in grafana/victoriametrics.

The hll is hyperloglog bytes array used for the internal data structure of the HyperLogLog for unique connection tracking. We serialize it to a database because we want to have unique tracking across multiple pods.

Extracted this migration from a bigger PR: #9074

Actual usage of the byte array serialization/deserialization is shown here: https://github.com/Unleash/unleash/pull/9074/files#diff-309cb0c2c562243279e6a15f9d9d7f4ddd33ae6ba526016e1e1b708209ecb877R27

Important files

Discussion points

Copy link

vercel bot commented Jan 10, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Jan 10, 2025 10:29am
unleash-monorepo-frontend ⬜️ Ignored (Inspect) Visit Preview Jan 10, 2025 10:29am

Copy link
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files

@kwasniew kwasniew merged commit 5a1f1a0 into main Jan 10, 2025
10 checks passed
@kwasniew kwasniew deleted the unique-connections-hll-migration branch January 10, 2025 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant